<?php
class ActivityDTO {
	
	public $book;
	public $user;
	public $presentUsername;
	public $userBook;
	public $type;
	public $date;
	
	/**
	 * Return html present text to viewer.
	 */
	public function getActivityHtmlText() {
		$htmlStr = "";
		switch($this->type) {
			case Activity::ACTIVATE_USER:
				$htmlStr = $this->date."<br/>".$this->presentUsername." has been activated.<br/>";
			break;
			case Activity::USER_ADD_BOOK:
				
				$htmlStr = $this->date."<br/>"
				.$this->presentUsername." add new book <strong>".$this->book->name."</strong>";
		      	break;
		}
		
		return $htmlStr;
	}
}
?>